home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6165 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: solon.com!not-for-mail
  2. From: ghenniga@ampere.NMSU.Edu (Gary Hennigan)
  3. Newsgroups: comp.lang.c.moderated,comp.lang.c
  4. Subject: Re: Test for infinity?
  5. Followup-To: comp.lang.c
  6. Date: 22 Feb 1996 18:14:33 -0600
  7. Organization: New Mexico State University - Electromagnetics Group
  8. Sender: clc@solutions.solon.com
  9. Approved: clc@solutions.solon.com
  10. Message-ID: <4gj0t9$lr4@solutions.solon.com>
  11. References: <4gfci8$2jd@solutions.solon.com>
  12. Reply-To: ghenniga@NMSU.Edu
  13. NNTP-Posting-Host: solutions.solon.com
  14. X-Newsreader: Gnus v5.1
  15.  
  16. In an article "John J. Har" <johnhar@aimnet.aimnet.com> wrote:
  17. >Is there any ANSI function or code snippet that would test a double for 
  18. >(positive) infinity? For that matter, how about for denormals and NaN's?
  19.  
  20. Take a look at the fp_class_d() and fp_class_f() functions. I don't
  21. know how well they travel across platforms but they are listed under
  22. ANSI/IEEE Std 754-1985 and seem to be present on Suns and SGIs.
  23.  
  24. [Not ANSI C, and not on any of my platforms, but IEEE is close enough.
  25.  Anyone trying to discuss details of IEEE here will be thrown to
  26.  talk.bizarre. -mod]
  27.  
  28. Gary
  29. (ghenniga@NMSU.Edu)
  30.